<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{- |
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998

A lint pass to check basic STG invariants:

- Variables should be defined before used.

- Let bindings should not have unboxed types (unboxed bindings should only
  appear in case), except when they're join points (see Note [Core let/app
  invariant] and #14117).

- If linting after unarisation, invariants listed in Note [Post-unarisation
  invariants].

Because we don't have types and coercions in STG we can't really check types
here.

Some history:

StgLint used to check types, but it never worked and so it was disabled in 2000
with this note:

    WARNING:
    ~~~~~~~~

    This module has suffered bit-rot; it is likely to yield lint errors
    for Stg code that is currently perfectly acceptable for code
    generation.  Solution: don't use it!  (KSW 2000-05).

Since then there were some attempts at enabling it again, as summarised in
#14787. It's finally decided that we remove all type checking and only look for
basic properties listed above.
-}</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, TypeFamilies,
  DeriveFunctor #-}</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Stg.Lint</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgTopBindings"><span class="hs-identifier">lintStgTopBindings</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html"><span class="hs-identifier">GHC.Stg.Syntax</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier">Bag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier">emptyBag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#isEmptyBag"><span class="hs-identifier">isEmptyBag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#snocBag"><span class="hs-identifier">snocBag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier">bagToList</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier">TopLevelFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#isTopLevel"><span class="hs-identifier">isTopLevel</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html"><span class="hs-identifier">GHC.Types.CostCentre</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html#isCurrentCCS"><span class="hs-identifier">isCurrentCCS</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idType"><span class="hs-identifier">idType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier">isJoinId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idName"><span class="hs-identifier">idName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html"><span class="hs-identifier">GHC.Types.Var.Set</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>             </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.html#AltCon"><span class="hs-identifier">AltCon</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier">getSrcLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier">nameIsLocalOrFrom</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier">MsgDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#Severity"><span class="hs-identifier">Severity</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#mkLocMessage"><span class="hs-identifier">mkLocMessage</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.RepType.html"><span class="hs-identifier">GHC.Types.RepType</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>            </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier">Module</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Err</span></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator">(&lt;|&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgTopBindings"><span class="hs-identifier hs-type">lintStgTopBindings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680954932"><span class="annot"><a href="#local-6989586621680954932"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954932"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954932"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>                   </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-65"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-comment">-- ^ module being compiled</span><span>
</span><span id="line-66"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>   </span><span class="hs-comment">-- ^ have we run Unarise yet?</span><span>
</span><span id="line-67"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-comment">-- ^ who produced the STG?</span><span>
</span><span id="line-68"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgTopBinding"><span class="hs-identifier hs-type">GenStgTopBinding</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954932"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-69"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span id="lintStgTopBindings"><span class="annot"><span class="annottext">lintStgTopBindings :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
DynFlags
-&gt; Module -&gt; Bool -&gt; String -&gt; [GenStgTopBinding a] -&gt; IO ()
</span><a href="GHC.Stg.Lint.html#lintStgTopBindings"><span class="hs-identifier hs-var hs-var">lintStgTopBindings</span></a></span></span><span> </span><span id="local-6989586621680954708"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680954708"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680954707"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954707"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621680954706"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680954706"><span class="hs-identifier hs-var">unarised</span></a></span></span><span> </span><span id="local-6989586621680954705"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954705"><span class="hs-identifier hs-var">whodunnit</span></a></span></span><span> </span><span id="local-6989586621680954704"><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954704"><span class="hs-identifier hs-var">binds</span></a></span></span><span>
</span><span id="line-72"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;StgLint&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool -&gt; StgPprOpts -&gt; IdSet -&gt; LintM () -&gt; Maybe MsgDoc
forall a.
Module -&gt; Bool -&gt; StgPprOpts -&gt; IdSet -&gt; LintM a -&gt; Maybe MsgDoc
</span><a href="GHC.Stg.Lint.html#initL"><span class="hs-identifier hs-var">initL</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954707"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680954706"><span class="hs-identifier hs-var">unarised</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954702"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954701"><span class="hs-identifier hs-var">top_level_binds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenStgTopBinding a] -&gt; LintM ()
</span><a href="#local-6989586621680954700"><span class="hs-identifier hs-var">lint_binds</span></a></span><span> </span><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954704"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-74"></span><span>      </span><span class="annot"><span class="annottext">Maybe MsgDoc
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-75"></span><span>        </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680954699"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954699"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-77"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; WarnReason -&gt; Severity -&gt; SrcSpan -&gt; MsgDoc -&gt; IO ()
</span><a href="GHC.Driver.Session.html#putLogMsg"><span class="hs-identifier hs-var">putLogMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680954708"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevDump"><span class="hs-identifier hs-var">Err.SevDump</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#noSrcSpan"><span class="hs-identifier hs-var">noSrcSpan</span></a></span><span>
</span><span id="line-78"></span><span>          </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IO ()) -&gt; MsgDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#withPprStyle"><span class="hs-identifier hs-var">withPprStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="GHC.Utils.Outputable.html#defaultDumpStyle"><span class="hs-identifier hs-var">defaultDumpStyle</span></a></span><span>
</span><span id="line-79"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*** Stg Lint ErrMsgs: in&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-80"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954705"><span class="hs-identifier hs-var">whodunnit</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;***&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-81"></span><span>                  </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954699"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-82"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*** Offending Program ***&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-83"></span><span>                  </span><span class="annot"><span class="annottext">StgPprOpts -&gt; [GenStgTopBinding a] -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; [GenStgTopBinding pass] -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprGenStgTopBindings"><span class="hs-identifier hs-var">pprGenStgTopBindings</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954702"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954704"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-84"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*** End of Offense ***&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; Int -&gt; IO ()
</span><a href="GHC.Utils.Error.html#ghcExit"><span class="hs-identifier hs-var">Err.ghcExit</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680954708"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-87"></span><span>    </span><span id="local-6989586621680954702"><span class="annot"><span class="annottext">opts :: StgPprOpts
</span><a href="#local-6989586621680954702"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; StgPprOpts
</span><a href="GHC.Stg.Syntax.html#initStgPprOpts"><span class="hs-identifier hs-var">initStgPprOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680954708"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-88"></span><span>    </span><span class="hs-comment">-- Bring all top-level binds into scope because CoreToStg does not generate</span><span>
</span><span id="line-89"></span><span>    </span><span class="hs-comment">-- bindings in dependency order (so we may see a use before its definition).</span><span>
</span><span id="line-90"></span><span>    </span><span id="local-6989586621680954701"><span class="annot"><span class="annottext">top_level_binds :: IdSet
</span><a href="#local-6989586621680954701"><span class="hs-identifier hs-var hs-var">top_level_binds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; IdSet
</span><a href="GHC.Types.Var.Set.html#mkVarSet"><span class="hs-identifier hs-var">mkVarSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenStgTopBinding a] -&gt; [Id]
forall (a :: StgPass).
(BinderP a ~ Id) =&gt;
[GenStgTopBinding a] -&gt; [Id]
</span><a href="GHC.Stg.Syntax.html#bindersOfTopBinds"><span class="hs-identifier hs-var">bindersOfTopBinds</span></a></span><span> </span><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954704"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>    </span><span class="annot"><a href="#local-6989586621680954700"><span class="hs-identifier hs-type">lint_binds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgTopBinding"><span class="hs-identifier hs-type">GenStgTopBinding</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954932"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>    </span><span id="local-6989586621680954700"><span class="annot"><span class="annottext">lint_binds :: [GenStgTopBinding a] -&gt; LintM ()
</span><a href="#local-6989586621680954700"><span class="hs-identifier hs-var hs-var">lint_binds</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>    </span><span class="annot"><a href="#local-6989586621680954700"><span class="hs-identifier hs-var">lint_binds</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954684"><span class="annot"><span class="annottext">GenStgTopBinding a
</span><a href="#local-6989586621680954684"><span class="hs-identifier hs-var">bind</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680954683"><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954683"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-96"></span><span>        </span><span id="local-6989586621680954682"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954682"><span class="hs-identifier hs-var">binders</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GenStgTopBinding a -&gt; LintM [Id]
forall {a :: StgPass}.
(Outputable (XLet a), Outputable (XLetNoEscape a),
 Outputable (XRhsClosure a), OutputableBndr (BinderP a),
 BinderP a ~ Id) =&gt;
GenStgTopBinding a -&gt; LintM [Id]
</span><a href="#local-6989586621680954681"><span class="hs-identifier hs-var">lint_bind</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgTopBinding a
</span><a href="#local-6989586621680954684"><span class="hs-identifier hs-var">bind</span></a></span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954682"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-98"></span><span>            </span><span class="annot"><span class="annottext">[GenStgTopBinding a] -&gt; LintM ()
</span><a href="#local-6989586621680954700"><span class="hs-identifier hs-var">lint_binds</span></a></span><span> </span><span class="annot"><span class="annottext">[GenStgTopBinding a]
</span><a href="#local-6989586621680954683"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>    </span><span id="local-6989586621680954681"><span class="annot"><span class="annottext">lint_bind :: GenStgTopBinding a -&gt; LintM [Id]
</span><a href="#local-6989586621680954681"><span class="hs-identifier hs-var hs-var">lint_bind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgTopLifted"><span class="hs-identifier hs-type">StgTopLifted</span></a></span><span> </span><span id="local-6989586621680954654"><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954654"><span class="hs-identifier hs-var">bind</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
</span><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-var">lintStgBinds</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954654"><span class="hs-identifier hs-var">bind</span></a></span><span>
</span><span id="line-101"></span><span>    </span><span class="annot"><a href="#local-6989586621680954681"><span class="hs-identifier hs-var">lint_bind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgTopStringLit"><span class="hs-identifier hs-type">StgTopStringLit</span></a></span><span> </span><span id="local-6989586621680954650"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954650"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; LintM [Id]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954650"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-type">lintStgArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span id="lintStgArg"><span class="annot"><span class="annottext">lintStgArg :: StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var hs-var">lintStgArg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLitArg"><span class="hs-identifier hs-type">StgLitArg</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var">lintStgArg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgVarArg"><span class="hs-identifier hs-type">StgVarArg</span></a></span><span> </span><span id="local-6989586621680954646"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954646"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgVar"><span class="hs-identifier hs-var">lintStgVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954646"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgVar"><span class="hs-identifier hs-type">lintStgVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span id="lintStgVar"><span class="annot"><span class="annottext">lintStgVar :: Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgVar"><span class="hs-identifier hs-var hs-var">lintStgVar</span></a></span></span><span> </span><span id="local-6989586621680954644"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954644"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkInScope"><span class="hs-identifier hs-var">checkInScope</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954644"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span id="local-6989586621680954898"><span class="annot"><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-type">lintStgBinds</span></a></span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954898"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954898"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier hs-type">TopLevelFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgBinding"><span class="hs-identifier hs-type">GenStgBinding</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954898"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span></span><span> </span><span class="hs-comment">-- Returns the binders</span><span>
</span><span id="line-113"></span><span id="lintStgBinds"><span class="annot"><span class="annottext">lintStgBinds :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
</span><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-var hs-var">lintStgBinds</span></a></span></span><span> </span><span id="local-6989586621680954621"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954621"><span class="hs-identifier hs-var">top_lvl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgNonRec"><span class="hs-identifier hs-type">StgNonRec</span></a></span><span> </span><span id="local-6989586621680954619"><span class="annot"><span class="annottext">BinderP a
</span><a href="#local-6989586621680954619"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680954618"><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954618"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-114"></span><span>    </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; (Id, GenStgRhs a) -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; (Id, GenStgRhs a) -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lint_binds_help"><span class="hs-identifier hs-var">lint_binds_help</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954621"><span class="hs-identifier hs-var">top_lvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
BinderP a
</span><a href="#local-6989586621680954619"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954618"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>    </span><span class="annot"><span class="annottext">[Id] -&gt; LintM [Id]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
BinderP a
</span><a href="#local-6989586621680954619"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-var">lintStgBinds</span></a></span><span> </span><span id="local-6989586621680954616"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954616"><span class="hs-identifier hs-var">top_lvl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRec"><span class="hs-identifier hs-type">StgRec</span></a></span><span> </span><span id="local-6989586621680954614"><span class="annot"><span class="annottext">[(BinderP a, GenStgRhs a)]
</span><a href="#local-6989586621680954614"><span class="hs-identifier hs-var">pairs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; LintM [Id] -&gt; LintM [Id]
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954613"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">(LintM [Id] -&gt; LintM [Id]) -&gt; LintM [Id] -&gt; LintM [Id]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-119"></span><span>        </span><span class="annot"><span class="annottext">((Id, GenStgRhs a) -&gt; LintM ()) -&gt; [(Id, GenStgRhs a)] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TopLevelFlag -&gt; (Id, GenStgRhs a) -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; (Id, GenStgRhs a) -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lint_binds_help"><span class="hs-identifier hs-var">lint_binds_help</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954616"><span class="hs-identifier hs-var">top_lvl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Id, GenStgRhs a)]
[(BinderP a, GenStgRhs a)]
</span><a href="#local-6989586621680954614"><span class="hs-identifier hs-var">pairs</span></a></span><span>
</span><span id="line-120"></span><span>        </span><span class="annot"><span class="annottext">[Id] -&gt; LintM [Id]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954613"><span class="hs-identifier hs-var">binders</span></a></span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-122"></span><span>    </span><span id="local-6989586621680954613"><span class="annot"><span class="annottext">binders :: [Id]
</span><a href="#local-6989586621680954613"><span class="hs-identifier hs-var hs-var">binders</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954611"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954611"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954611"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">GenStgRhs a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Id, GenStgRhs a)]
[(BinderP a, GenStgRhs a)]
</span><a href="#local-6989586621680954614"><span class="hs-identifier hs-var">pairs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span id="local-6989586621680954892"><span class="annot"><a href="GHC.Stg.Lint.html#lint_binds_help"><span class="hs-identifier hs-type">lint_binds_help</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954892"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954892"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier hs-type">TopLevelFlag</span></a></span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgRhs"><span class="hs-identifier hs-type">GenStgRhs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954892"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-129"></span><span id="lint_binds_help"><span class="annot"><span class="annottext">lint_binds_help :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; (Id, GenStgRhs a) -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lint_binds_help"><span class="hs-identifier hs-var hs-var">lint_binds_help</span></a></span></span><span> </span><span id="local-6989586621680954589"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954589"><span class="hs-identifier hs-var">top_lvl</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954588"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954588"><span class="hs-identifier hs-var">binder</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954587"><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954587"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintLocInfo -&gt; LintM () -&gt; LintM ()
forall a. LintLocInfo -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-var">addLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; LintLocInfo
</span><a href="GHC.Stg.Lint.html#RhsOf"><span class="hs-identifier hs-var">RhsOf</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954588"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; LintM () -&gt; LintM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TopLevelFlag -&gt; Bool
</span><a href="GHC.Types.Basic.html#isTopLevel"><span class="hs-identifier hs-var">isTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621680954589"><span class="hs-identifier hs-var">top_lvl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenStgRhs a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgRhs a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkNoCurrentCCS"><span class="hs-identifier hs-var">checkNoCurrentCCS</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954587"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>        </span><span class="annot"><span class="annottext">GenStgRhs a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgRhs a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgRhs"><span class="hs-identifier hs-var">lintStgRhs</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954587"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-133"></span><span>        </span><span id="local-6989586621680954581"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954581"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var">getStgPprOpts</span></a></span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-comment">-- Check binder doesn't have unlifted type or it's a join point</span><span>
</span><span id="line-135"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkL"><span class="hs-identifier hs-var">checkL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-var">isJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954588"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Kind -&gt; Bool
Kind -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954588"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgPprOpts -&gt; Id -&gt; GenStgRhs a -&gt; MsgDoc
forall (a :: StgPass).
OutputablePass a =&gt;
StgPprOpts -&gt; Id -&gt; GenStgRhs a -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#mkUnliftedTyMsg"><span class="hs-identifier hs-var">mkUnliftedTyMsg</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954581"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954588"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954587"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Top-level bindings can't inherit the cost centre stack from their</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- (static) allocation site.</span><span>
</span><span id="line-140"></span><span id="local-6989586621680954882"><span class="annot"><a href="GHC.Stg.Lint.html#checkNoCurrentCCS"><span class="hs-identifier hs-type">checkNoCurrentCCS</span></a></span><span>
</span><span id="line-141"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954882"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954882"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgRhs"><span class="hs-identifier hs-type">GenStgRhs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954882"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-143"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-144"></span><span id="checkNoCurrentCCS"><span class="annot"><span class="annottext">checkNoCurrentCCS :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgRhs a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkNoCurrentCCS"><span class="hs-identifier hs-var hs-var">checkNoCurrentCCS</span></a></span></span><span> </span><span id="local-6989586621680954562"><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954562"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-145"></span><span>   </span><span id="local-6989586621680954561"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954561"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var">getStgPprOpts</span></a></span><span>
</span><span id="line-146"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680954560"><span class="annot"><span class="annottext">rhs' :: MsgDoc
</span><a href="#local-6989586621680954560"><span class="hs-identifier hs-var hs-var">rhs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StgPprOpts -&gt; GenStgRhs a -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; GenStgRhs pass -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprStgRhs"><span class="hs-identifier hs-var">pprStgRhs</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954561"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954562"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-147"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954562"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-148"></span><span>      </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRhsClosure"><span class="hs-identifier hs-type">StgRhsClosure</span></a></span><span> </span><span class="annot"><span class="annottext">XRhsClosure a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954557"><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621680954557"><span class="hs-identifier hs-var">ccs</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpdateFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[BinderP a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-149"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CostCentreStack -&gt; Bool
</span><a href="GHC.Types.CostCentre.html#isCurrentCCS"><span class="hs-identifier hs-var">isCurrentCCS</span></a></span><span> </span><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621680954557"><span class="hs-identifier hs-var">ccs</span></a></span><span>
</span><span id="line-150"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Top-level StgRhsClosure with CurrentCCS&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954560"><span class="hs-identifier hs-var">rhs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>      </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRhsCon"><span class="hs-identifier hs-type">StgRhsCon</span></a></span><span> </span><span id="local-6989586621680954553"><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621680954553"><span class="hs-identifier hs-var">ccs</span></a></span></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-152"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CostCentreStack -&gt; Bool
</span><a href="GHC.Types.CostCentre.html#isCurrentCCS"><span class="hs-identifier hs-var">isCurrentCCS</span></a></span><span> </span><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621680954553"><span class="hs-identifier hs-var">ccs</span></a></span><span>
</span><span id="line-153"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Top-level StgRhsCon with CurrentCCS&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954560"><span class="hs-identifier hs-var">rhs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>      </span><span class="annot"><span class="annottext">GenStgRhs a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span id="local-6989586621680954552"><span class="annot"><a href="GHC.Stg.Lint.html#lintStgRhs"><span class="hs-identifier hs-type">lintStgRhs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954552"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954552"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgRhs"><span class="hs-identifier hs-type">GenStgRhs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954552"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span id="lintStgRhs"><span class="annot"><span class="annottext">lintStgRhs :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgRhs a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgRhs"><span class="hs-identifier hs-var hs-var">lintStgRhs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRhsClosure"><span class="hs-identifier hs-type">StgRhsClosure</span></a></span><span> </span><span class="annot"><span class="annottext">XRhsClosure a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CostCentreStack
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">UpdateFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680954528"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954528"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954528"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgRhs"><span class="hs-identifier hs-var">lintStgRhs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRhsClosure"><span class="hs-identifier hs-type">StgRhsClosure</span></a></span><span> </span><span class="annot"><span class="annottext">XRhsClosure a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CostCentreStack
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">UpdateFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954526"><span class="annot"><span class="annottext">[BinderP a]
</span><a href="#local-6989586621680954526"><span class="hs-identifier hs-var">binders</span></a></span></span><span> </span><span id="local-6989586621680954525"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954525"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintLocInfo -&gt; LintM () -&gt; LintM ()
forall a. LintLocInfo -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-var">addLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; LintLocInfo
</span><a href="GHC.Stg.Lint.html#LambdaBodyOf"><span class="hs-identifier hs-var">LambdaBodyOf</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
[BinderP a]
</span><a href="#local-6989586621680954526"><span class="hs-identifier hs-var">binders</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-163"></span><span>      </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
[BinderP a]
</span><a href="#local-6989586621680954526"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-164"></span><span>        </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954525"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgRhs"><span class="hs-identifier hs-var">lintStgRhs</span></a></span><span> </span><span id="local-6989586621680954523"><span class="annot"><span class="annottext">rhs :: GenStgRhs a
</span><a href="#local-6989586621680954523"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgRhsCon"><span class="hs-identifier hs-type">StgRhsCon</span></a></span><span> </span><span class="annot"><span class="annottext">CostCentreStack
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954522"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680954522"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span id="local-6989586621680954521"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954521"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-167"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; LintM () -&gt; LintM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier hs-var">isUnboxedTupleCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680954522"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier hs-var">isUnboxedSumCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680954522"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-168"></span><span>      </span><span id="local-6989586621680954518"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954518"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var">getStgPprOpts</span></a></span><span>
</span><span id="line-169"></span><span>      </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;StgRhsCon is an unboxed tuple or sum application&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-170"></span><span>               </span><span class="annot"><span class="annottext">StgPprOpts -&gt; GenStgRhs a -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; GenStgRhs pass -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprStgRhs"><span class="hs-identifier hs-var">pprStgRhs</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954518"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954523"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var">lintStgArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954521"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-172"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkPostUnariseConArg"><span class="hs-identifier hs-var">checkPostUnariseConArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954521"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span id="local-6989586621680954873"><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-type">lintStgExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954873"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954873"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgExpr"><span class="hs-identifier hs-type">GenStgExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954873"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span id="lintStgExpr"><span class="annot"><span class="annottext">lintStgExpr :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var hs-var">lintStgExpr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLit"><span class="hs-identifier hs-type">StgLit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgApp"><span class="hs-identifier hs-type">StgApp</span></a></span><span> </span><span id="local-6989586621680954466"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954466"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span id="local-6989586621680954465"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954465"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-179"></span><span>    </span><span class="annot"><span class="annottext">Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgVar"><span class="hs-identifier hs-var">lintStgVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954466"><span class="hs-identifier hs-var">fun</span></a></span><span>
</span><span id="line-180"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var">lintStgArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954465"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span id="local-6989586621680954464"><span class="annot"><span class="annottext">app :: GenStgExpr a
</span><a href="#local-6989586621680954464"><span class="hs-identifier hs-var">app</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgConApp"><span class="hs-identifier hs-type">StgConApp</span></a></span><span> </span><span id="local-6989586621680954462"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680954462"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span id="local-6989586621680954461"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954461"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621680954460"><span class="annot"><span class="annottext">[Kind]
</span><a href="#local-6989586621680954460"><span class="hs-identifier hs-var">_arg_tys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-183"></span><span>    </span><span class="hs-comment">-- unboxed sums should vanish during unarise</span><span>
</span><span id="line-184"></span><span>    </span><span id="local-6989586621680954459"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954459"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM LintFlags
</span><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-var">getLintFlags</span></a></span><span>
</span><span id="line-185"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; LintM () -&gt; LintM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintFlags -&gt; Bool
</span><a href="GHC.Stg.Lint.html#lf_unarised"><span class="hs-identifier hs-var hs-var">lf_unarised</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954459"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier hs-var">isUnboxedSumCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680954462"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-186"></span><span>      </span><span id="local-6989586621680954455"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954455"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var">getStgPprOpts</span></a></span><span>
</span><span id="line-187"></span><span>      </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unboxed sum after unarise:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-188"></span><span>               </span><span class="annot"><span class="annottext">StgPprOpts -&gt; GenStgExpr a -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; GenStgExpr pass -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprStgExpr"><span class="hs-identifier hs-var">pprStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954455"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954464"><span class="hs-identifier hs-var">app</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var">lintStgArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954461"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-190"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkPostUnariseConArg"><span class="hs-identifier hs-var">checkPostUnariseConArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954461"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgOpApp"><span class="hs-identifier hs-type">StgOpApp</span></a></span><span> </span><span class="annot"><span class="annottext">StgOp
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954452"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954452"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="annot"><span class="annottext">Kind
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-193"></span><span>    </span><span class="annot"><span class="annottext">(StgArg -&gt; LintM ()) -&gt; [StgArg] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgArg"><span class="hs-identifier hs-var">lintStgArg</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621680954452"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span id="local-6989586621680954451"><span class="annot"><span class="annottext">lam :: GenStgExpr a
</span><a href="#local-6989586621680954451"><span class="hs-identifier hs-var">lam</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLam"><span class="hs-identifier hs-type">StgLam</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty (BinderP a)
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">StgExpr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-196"></span><span>    </span><span id="local-6989586621680954449"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954449"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var">getStgPprOpts</span></a></span><span>
</span><span id="line-197"></span><span>    </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unexpected StgLam&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts -&gt; GenStgExpr a -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; GenStgExpr pass -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprStgExpr"><span class="hs-identifier hs-var">pprStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954449"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954451"><span class="hs-identifier hs-var">lam</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLet"><span class="hs-identifier hs-type">StgLet</span></a></span><span> </span><span class="annot"><span class="annottext">XLet a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954447"><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954447"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span id="local-6989586621680954446"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954446"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-200"></span><span>    </span><span id="local-6989586621680954445"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954445"><span class="hs-identifier hs-var">binders</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
</span><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-var">lintStgBinds</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954447"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-201"></span><span>    </span><span class="annot"><span class="annottext">LintLocInfo -&gt; LintM () -&gt; LintM ()
forall a. LintLocInfo -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-var">addLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; LintLocInfo
</span><a href="GHC.Stg.Lint.html#BodyOfLetRec"><span class="hs-identifier hs-var">BodyOfLetRec</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954445"><span class="hs-identifier hs-var">binders</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-202"></span><span>      </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954445"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-203"></span><span>        </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954446"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLetNoEscape"><span class="hs-identifier hs-type">StgLetNoEscape</span></a></span><span> </span><span class="annot"><span class="annottext">XLetNoEscape a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954441"><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954441"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span id="local-6989586621680954440"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954440"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-206"></span><span>    </span><span id="local-6989586621680954439"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954439"><span class="hs-identifier hs-var">binders</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
TopLevelFlag -&gt; GenStgBinding a -&gt; LintM [Id]
</span><a href="GHC.Stg.Lint.html#lintStgBinds"><span class="hs-identifier hs-var">lintStgBinds</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgBinding a
</span><a href="#local-6989586621680954441"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-207"></span><span>    </span><span class="annot"><span class="annottext">LintLocInfo -&gt; LintM () -&gt; LintM ()
forall a. LintLocInfo -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-var">addLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; LintLocInfo
</span><a href="GHC.Stg.Lint.html#BodyOfLetRec"><span class="hs-identifier hs-var">BodyOfLetRec</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954439"><span class="hs-identifier hs-var">binders</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-208"></span><span>      </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954439"><span class="hs-identifier hs-var">binders</span></a></span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-209"></span><span>        </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954440"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgTick"><span class="hs-identifier hs-type">StgTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Id
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680954437"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954437"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954437"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgCase"><span class="hs-identifier hs-type">StgCase</span></a></span><span> </span><span id="local-6989586621680954435"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954435"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span id="local-6989586621680954434"><span class="annot"><span class="annottext">BinderP a
</span><a href="#local-6989586621680954434"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680954433"><span class="annot"><span class="annottext">AltType
</span><a href="#local-6989586621680954433"><span class="hs-identifier hs-var">alts_type</span></a></span></span><span> </span><span id="local-6989586621680954432"><span class="annot"><span class="annottext">[GenStgAlt a]
</span><a href="#local-6989586621680954432"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-214"></span><span>    </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954435"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621680954431"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954431"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM LintFlags
</span><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-var">getLintFlags</span></a></span><span>
</span><span id="line-217"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680954430"><span class="annot"><span class="annottext">in_scope :: Bool
</span><a href="#local-6989586621680954430"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AltType -&gt; Bool -&gt; Bool
</span><a href="GHC.Stg.Syntax.html#stgCaseBndrInScope"><span class="hs-identifier hs-var">stgCaseBndrInScope</span></a></span><span> </span><span class="annot"><span class="annottext">AltType
</span><a href="#local-6989586621680954433"><span class="hs-identifier hs-var">alts_type</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintFlags -&gt; Bool
</span><a href="GHC.Stg.Lint.html#lf_unarised"><span class="hs-identifier hs-var hs-var">lf_unarised</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954431"><span class="hs-identifier hs-var">lf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>    </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
BinderP a
</span><a href="#local-6989586621680954434"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680954430"><span class="hs-identifier hs-var">in_scope</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((AltCon, [Id], GenStgExpr a) -&gt; LintM ())
-&gt; [(AltCon, [Id], GenStgExpr a)] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">(AltCon, [Id], GenStgExpr a) -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
(AltCon, [Id], GenStgExpr a) -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintAlt"><span class="hs-identifier hs-var">lintAlt</span></a></span><span> </span><span class="annot"><span class="annottext">[(AltCon, [Id], GenStgExpr a)]
[GenStgAlt a]
</span><a href="#local-6989586621680954432"><span class="hs-identifier hs-var">alts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span id="local-6989586621680954862"><span class="annot"><a href="GHC.Stg.Lint.html#lintAlt"><span class="hs-identifier hs-type">lintAlt</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954862"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#BinderP"><span class="hs-identifier hs-type">BinderP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954862"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-type">~</span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#AltCon"><span class="hs-identifier hs-type">AltCon</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgExpr"><span class="hs-identifier hs-type">GenStgExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954862"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span id="lintAlt"><span class="annot"><span class="annottext">lintAlt :: forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
(AltCon, [Id], GenStgExpr a) -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintAlt"><span class="hs-identifier hs-var hs-var">lintAlt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AltCon
</span><a href="GHC.Core.html#DEFAULT"><span class="hs-identifier hs-var">DEFAULT</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954407"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954407"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-226"></span><span>    </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954407"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintAlt"><span class="hs-identifier hs-var">lintAlt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#LitAlt"><span class="hs-identifier hs-type">LitAlt</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954405"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954405"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954405"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.Stg.Lint.html#lintAlt"><span class="hs-identifier hs-var">lintAlt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#DataAlt"><span class="hs-identifier hs-type">DataAlt</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954403"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954403"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954402"><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954402"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-232"></span><span>    </span><span class="annot"><span class="annottext">(Id -&gt; LintM ()) -&gt; [Id] -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkPostUnariseBndr"><span class="hs-identifier hs-var">checkPostUnariseBndr</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954403"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><span class="annottext">[Id] -&gt; LintM () -&gt; LintM ()
forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var">addInScopeVars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954403"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenStgExpr a -&gt; LintM ()
forall (a :: StgPass).
(OutputablePass a, BinderP a ~ Id) =&gt;
GenStgExpr a -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#lintStgExpr"><span class="hs-identifier hs-var">lintStgExpr</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgExpr a
</span><a href="#local-6989586621680954402"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
The Lint monad
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span class="hs-keyword">newtype</span><span> </span><span id="LintM"><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span></span><span> </span><span id="local-6989586621680954860"><span class="annot"><a href="#local-6989586621680954860"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LintM"><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span></span><span>
</span><span id="line-244"></span><span>    </span><span class="hs-special">{</span><span> </span><span id="unLintM"><span class="annot"><span class="annottext">forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-245"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintFlags"><span class="hs-identifier hs-type">LintFlags</span></a></span><span>
</span><span id="line-246"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgPprOpts"><span class="hs-identifier hs-type">StgPprOpts</span></a></span><span>        </span><span class="hs-comment">-- Pretty-printing options</span><span>
</span><span id="line-247"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Lint.html#LintLocInfo"><span class="hs-identifier hs-type">LintLocInfo</span></a></span><span class="hs-special">]</span><span>     </span><span class="hs-comment">-- Locations</span><span>
</span><span id="line-248"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span>             </span><span class="hs-comment">-- Local vars in scope</span><span>
</span><span id="line-249"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span>        </span><span class="hs-comment">-- Error messages so far</span><span>
</span><span id="line-250"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680954860"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Result and error messages (if any)</span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-252"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954395"><span id="local-6989586621680954397"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; LintM a -&gt; LintM b)
-&gt; (forall a b. a -&gt; LintM b -&gt; LintM a) -&gt; Functor LintM
forall a b. a -&gt; LintM b -&gt; LintM a
forall a b. (a -&gt; b) -&gt; LintM a -&gt; LintM b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; LintM b -&gt; LintM a
$c&lt;$ :: forall a b. a -&gt; LintM b -&gt; LintM a
fmap :: forall a b. (a -&gt; b) -&gt; LintM a -&gt; LintM b
$cfmap :: forall a b. (a -&gt; b) -&gt; LintM a -&gt; LintM b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>
</span><span id="line-254"></span><span class="hs-keyword">data</span><span> </span><span id="LintFlags"><span class="annot"><a href="GHC.Stg.Lint.html#LintFlags"><span class="hs-identifier hs-var">LintFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LintFlags"><span class="annot"><a href="GHC.Stg.Lint.html#LintFlags"><span class="hs-identifier hs-var">LintFlags</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="lf_unarised"><span class="annot"><span class="annottext">LintFlags -&gt; Bool
</span><a href="GHC.Stg.Lint.html#lf_unarised"><span class="hs-identifier hs-var hs-var">lf_unarised</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-255"></span><span>                             </span><span class="hs-comment">-- ^ have we run the unariser yet?</span><span>
</span><span id="line-256"></span><span>                           </span><span class="hs-special">}</span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="hs-keyword">data</span><span> </span><span id="LintLocInfo"><span class="annot"><a href="GHC.Stg.Lint.html#LintLocInfo"><span class="hs-identifier hs-var">LintLocInfo</span></a></span></span><span>
</span><span id="line-259"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="RhsOf"><span class="annot"><a href="GHC.Stg.Lint.html#RhsOf"><span class="hs-identifier hs-var">RhsOf</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>            </span><span class="hs-comment">-- The variable bound</span><span>
</span><span id="line-260"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LambdaBodyOf"><span class="annot"><a href="GHC.Stg.Lint.html#LambdaBodyOf"><span class="hs-identifier hs-var">LambdaBodyOf</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- The lambda-binder</span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BodyOfLetRec"><span class="annot"><a href="GHC.Stg.Lint.html#BodyOfLetRec"><span class="hs-identifier hs-var">BodyOfLetRec</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- One of the binders</span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.Stg.Lint.html#dumpLoc"><span class="hs-identifier hs-type">dumpLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintLocInfo"><span class="hs-identifier hs-type">LintLocInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span id="dumpLoc"><span class="annot"><span class="annottext">dumpLoc :: LintLocInfo -&gt; (SrcSpan, MsgDoc)
</span><a href="GHC.Stg.Lint.html#dumpLoc"><span class="hs-identifier hs-var hs-var">dumpLoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Lint.html#RhsOf"><span class="hs-identifier hs-type">RhsOf</span></a></span><span> </span><span id="local-6989586621680954389"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954389"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-265"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcLoc -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#srcLocSpan"><span class="hs-identifier hs-var">srcLocSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SrcLoc
forall a. NamedThing a =&gt; a -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier hs-var">getSrcLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954389"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; [RHS of &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#pp_binders"><span class="hs-identifier hs-var">pp_binders</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954389"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span class="annot"><a href="GHC.Stg.Lint.html#dumpLoc"><span class="hs-identifier hs-var">dumpLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Lint.html#LambdaBodyOf"><span class="hs-identifier hs-type">LambdaBodyOf</span></a></span><span> </span><span id="local-6989586621680954384"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954384"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-267"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcLoc -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#srcLocSpan"><span class="hs-identifier hs-var">srcLocSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SrcLoc
forall a. NamedThing a =&gt; a -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier hs-var">getSrcLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; Id
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954384"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; [in body of lambda with binders &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#pp_binders"><span class="hs-identifier hs-var">pp_binders</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954384"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="annot"><a href="GHC.Stg.Lint.html#dumpLoc"><span class="hs-identifier hs-var">dumpLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Lint.html#BodyOfLetRec"><span class="hs-identifier hs-type">BodyOfLetRec</span></a></span><span> </span><span id="local-6989586621680954382"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954382"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcLoc -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#srcLocSpan"><span class="hs-identifier hs-var">srcLocSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SrcLoc
forall a. NamedThing a =&gt; a -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier hs-var">getSrcLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; Id
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954382"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; [in body of letrec with binders &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#pp_binders"><span class="hs-identifier hs-var">pp_binders</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954382"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="annot"><a href="GHC.Stg.Lint.html#pp_binders"><span class="hs-identifier hs-type">pp_binders</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-274"></span><span id="pp_binders"><span class="annot"><span class="annottext">pp_binders :: [Id] -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#pp_binders"><span class="hs-identifier hs-var hs-var">pp_binders</span></a></span></span><span> </span><span id="local-6989586621680954381"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954381"><span class="hs-identifier hs-var">bs</span></a></span></span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; [MsgDoc] -&gt; [MsgDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Id -&gt; MsgDoc) -&gt; [Id] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
</span><a href="#local-6989586621680954377"><span class="hs-identifier hs-var">pp_binder</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954381"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621680954377"><span class="annot"><span class="annottext">pp_binder :: Id -&gt; MsgDoc
</span><a href="#local-6989586621680954377"><span class="hs-identifier hs-var hs-var">pp_binder</span></a></span></span><span> </span><span id="local-6989586621680954374"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954374"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-278"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954374"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954374"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span id="local-6989586621680954914"><span class="annot"><a href="GHC.Stg.Lint.html#initL"><span class="hs-identifier hs-type">initL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgPprOpts"><span class="hs-identifier hs-type">StgPprOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#IdSet"><span class="hs-identifier hs-type">IdSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954914"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span></span><span>
</span><span id="line-281"></span><span id="initL"><span class="annot"><span class="annottext">initL :: forall a.
Module -&gt; Bool -&gt; StgPprOpts -&gt; IdSet -&gt; LintM a -&gt; Maybe MsgDoc
</span><a href="GHC.Stg.Lint.html#initL"><span class="hs-identifier hs-var hs-var">initL</span></a></span></span><span> </span><span id="local-6989586621680954370"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954370"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621680954369"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680954369"><span class="hs-identifier hs-var">unarised</span></a></span></span><span> </span><span id="local-6989586621680954368"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954368"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954367"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954367"><span class="hs-identifier hs-var">locals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span id="local-6989586621680954366"><span class="annot"><span class="annottext">Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="#local-6989586621680954366"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-282"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954365"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954365"><span class="hs-identifier hs-var">errs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="#local-6989586621680954366"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954370"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; LintFlags
</span><a href="GHC.Stg.Lint.html#LintFlags"><span class="hs-identifier hs-var">LintFlags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680954369"><span class="hs-identifier hs-var">unarised</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954368"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954367"><span class="hs-identifier hs-var">locals</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span>
</span><span id="line-283"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc -&gt; Bool
forall a. Bag a -&gt; Bool
</span><a href="GHC.Data.Bag.html#isEmptyBag"><span class="hs-identifier hs-var">isEmptyBag</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954365"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-284"></span><span>      </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-285"></span><span>  </span><span class="hs-keyword">else</span><span>
</span><span id="line-286"></span><span>      </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; [MsgDoc] -&gt; [MsgDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#blankLine"><span class="hs-identifier hs-var">blankLine</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bag MsgDoc -&gt; [MsgDoc]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954365"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680954355"><span id="local-6989586621680954358"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-289"></span><span>      </span><span id="local-6989586621680954353"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; LintM a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621680954352"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680954352"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (a, Bag MsgDoc))
 -&gt; LintM a)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954351"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954351"><span class="hs-identifier hs-var">_mod</span></a></span></span><span> </span><span id="local-6989586621680954350"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954350"><span class="hs-identifier hs-var">_lf</span></a></span></span><span> </span><span id="local-6989586621680954349"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954349"><span class="hs-identifier hs-var">_opts</span></a></span></span><span> </span><span id="local-6989586621680954348"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954348"><span class="hs-identifier hs-var">_loc</span></a></span></span><span> </span><span id="local-6989586621680954347"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954347"><span class="hs-identifier hs-var">_scope</span></a></span></span><span> </span><span id="local-6989586621680954346"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954346"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680954352"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954346"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-290"></span><span>      </span><span id="local-6989586621680954344"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. LintM (a -&gt; b) -&gt; LintM a -&gt; LintM b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintM (a -&gt; b) -&gt; LintM a -&gt; LintM b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-291"></span><span>      </span><span id="local-6989586621680954342"><span class="annot"><span class="annottext">*&gt; :: forall a b. LintM a -&gt; LintM b -&gt; LintM b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(*&gt;)</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintM a -&gt; LintM b -&gt; LintM b
forall a b. LintM a -&gt; LintM b -&gt; LintM b
</span><a href="GHC.Stg.Lint.html#thenL_"><span class="hs-identifier hs-var">thenL_</span></a></span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680954335"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-294"></span><span>    </span><span id="local-6989586621680954333"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. LintM a -&gt; (a -&gt; LintM b) -&gt; LintM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">(&gt;&gt;=)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintM a -&gt; (a -&gt; LintM b) -&gt; LintM b
forall a b. LintM a -&gt; (a -&gt; LintM b) -&gt; LintM b
</span><a href="GHC.Stg.Lint.html#thenL"><span class="hs-identifier hs-var">thenL</span></a></span><span>
</span><span id="line-295"></span><span>    </span><span id="local-6989586621680954330"><span class="annot"><span class="annottext">&gt;&gt; :: forall a b. LintM a -&gt; LintM b -&gt; LintM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&gt;&gt;)</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintM a -&gt; LintM b -&gt; LintM b
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span id="local-6989586621680954328"><span id="local-6989586621680954329"><span class="annot"><a href="GHC.Stg.Lint.html#thenL"><span class="hs-identifier hs-type">thenL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954329"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680954329"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954328"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954328"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-298"></span><span id="thenL"><span class="annot"><span class="annottext">thenL :: forall a b. LintM a -&gt; (a -&gt; LintM b) -&gt; LintM b
</span><a href="GHC.Stg.Lint.html#thenL"><span class="hs-identifier hs-var hs-var">thenL</span></a></span></span><span> </span><span id="local-6989586621680954327"><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954327"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680954326"><span class="annot"><span class="annottext">a -&gt; LintM b
</span><a href="#local-6989586621680954326"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (b, Bag MsgDoc))
-&gt; LintM b
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (b, Bag MsgDoc))
 -&gt; LintM b)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (b, Bag MsgDoc))
-&gt; LintM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954325"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954325"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680954324"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954324"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621680954323"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954323"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954322"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954322"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954321"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954321"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680954320"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954320"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954327"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954325"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954324"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954323"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954322"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954321"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954320"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-300"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621680954319"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680954319"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954318"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954318"><span class="hs-identifier hs-var">errs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LintM b
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (b, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; LintM b
</span><a href="#local-6989586621680954326"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680954319"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954325"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954324"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954323"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954322"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954321"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954318"><span class="hs-identifier hs-var">errs'</span></a></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span id="local-6989586621680954316"><span id="local-6989586621680954317"><span class="annot"><a href="GHC.Stg.Lint.html#thenL_"><span class="hs-identifier hs-type">thenL_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954317"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954316"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954316"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-303"></span><span id="thenL_"><span class="annot"><span class="annottext">thenL_ :: forall a b. LintM a -&gt; LintM b -&gt; LintM b
</span><a href="GHC.Stg.Lint.html#thenL_"><span class="hs-identifier hs-var hs-var">thenL_</span></a></span></span><span> </span><span id="local-6989586621680954315"><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954315"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680954314"><span class="annot"><span class="annottext">LintM b
</span><a href="#local-6989586621680954314"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (b, Bag MsgDoc))
-&gt; LintM b
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (b, Bag MsgDoc))
 -&gt; LintM b)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (b, Bag MsgDoc))
-&gt; LintM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954313"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954313"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680954312"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954312"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621680954311"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954311"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954310"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954310"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954309"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954309"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680954308"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954308"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-304"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954315"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954313"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954312"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954311"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954310"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954309"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954308"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-305"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680954307"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954307"><span class="hs-identifier hs-var">errs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LintM b
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (b, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="annot"><span class="annottext">LintM b
</span><a href="#local-6989586621680954314"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954313"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954312"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954311"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954310"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954309"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954307"><span class="hs-identifier hs-var">errs'</span></a></span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkL"><span class="hs-identifier hs-type">checkL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span id="checkL"><span class="annot"><span class="annottext">checkL :: Bool -&gt; MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkL"><span class="hs-identifier hs-var hs-var">checkL</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="annot"><span class="annottext">MsgDoc
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkL"><span class="hs-identifier hs-var">checkL</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span id="local-6989586621680954306"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954306"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954306"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="hs-comment">-- Case alts shouldn't have unboxed sum, unboxed tuple, or void binders.</span><span>
</span><span id="line-312"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkPostUnariseBndr"><span class="hs-identifier hs-type">checkPostUnariseBndr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-313"></span><span id="checkPostUnariseBndr"><span class="annot"><span class="annottext">checkPostUnariseBndr :: Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkPostUnariseBndr"><span class="hs-identifier hs-var hs-var">checkPostUnariseBndr</span></a></span></span><span> </span><span id="local-6989586621680954305"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954305"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-314"></span><span>    </span><span id="local-6989586621680954304"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954304"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM LintFlags
</span><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-var">getLintFlags</span></a></span><span>
</span><span id="line-315"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; LintM () -&gt; LintM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintFlags -&gt; Bool
</span><a href="GHC.Stg.Lint.html#lf_unarised"><span class="hs-identifier hs-var hs-var">lf_unarised</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954304"><span class="hs-identifier hs-var">lf</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-316"></span><span>      </span><span class="annot"><span class="annottext">Maybe String -&gt; (String -&gt; LintM ()) -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
t a -&gt; (a -&gt; m b) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#forM_"><span class="hs-identifier hs-var">forM_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Maybe String
</span><a href="GHC.Stg.Lint.html#checkPostUnariseId"><span class="hs-identifier hs-var">checkPostUnariseId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954305"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((String -&gt; LintM ()) -&gt; LintM ())
-&gt; (String -&gt; LintM ()) -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954301"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954301"><span class="hs-identifier hs-var">unexpected</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-317"></span><span>        </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; LintM ()) -&gt; MsgDoc -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-318"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;After unarisation, binder &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-319"></span><span>          </span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954305"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; has &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954301"><span class="hs-identifier hs-var">unexpected</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; type &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-320"></span><span>          </span><span class="annot"><span class="annottext">Kind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954305"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span class="hs-comment">-- Arguments shouldn't have sum, tuple, or void types.</span><span>
</span><span id="line-323"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkPostUnariseConArg"><span class="hs-identifier hs-type">checkPostUnariseConArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span id="checkPostUnariseConArg"><span class="annot"><span class="annottext">checkPostUnariseConArg :: StgArg -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkPostUnariseConArg"><span class="hs-identifier hs-var hs-var">checkPostUnariseConArg</span></a></span></span><span> </span><span id="local-6989586621680954300"><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621680954300"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621680954300"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-325"></span><span>    </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgLitArg"><span class="hs-identifier hs-type">StgLitArg</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-326"></span><span>      </span><span class="annot"><span class="annottext">() -&gt; LintM ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-327"></span><span>    </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgVarArg"><span class="hs-identifier hs-type">StgVarArg</span></a></span><span> </span><span id="local-6989586621680954299"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954299"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-328"></span><span>      </span><span id="local-6989586621680954298"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954298"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LintM LintFlags
</span><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-var">getLintFlags</span></a></span><span>
</span><span id="line-329"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; LintM () -&gt; LintM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintFlags -&gt; Bool
</span><a href="GHC.Stg.Lint.html#lf_unarised"><span class="hs-identifier hs-var hs-var">lf_unarised</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954298"><span class="hs-identifier hs-var">lf</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LintM () -&gt; LintM ()) -&gt; LintM () -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-330"></span><span>        </span><span class="annot"><span class="annottext">Maybe String -&gt; (String -&gt; LintM ()) -&gt; LintM ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
t a -&gt; (a -&gt; m b) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#forM_"><span class="hs-identifier hs-var">forM_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Maybe String
</span><a href="GHC.Stg.Lint.html#checkPostUnariseId"><span class="hs-identifier hs-var">checkPostUnariseId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954299"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((String -&gt; LintM ()) -&gt; LintM ())
-&gt; (String -&gt; LintM ()) -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954297"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954297"><span class="hs-identifier hs-var">unexpected</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-331"></span><span>          </span><span class="annot"><span class="annottext">MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var">addErrL</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; LintM ()) -&gt; MsgDoc -&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-332"></span><span>            </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;After unarisation, arg &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-333"></span><span>            </span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954299"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; has &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680954297"><span class="hs-identifier hs-var">unexpected</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; type &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-334"></span><span>            </span><span class="annot"><span class="annottext">Kind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954299"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="hs-comment">-- Post-unarisation args and case alt binders should not have unboxed tuple,</span><span>
</span><span id="line-337"></span><span class="hs-comment">-- unboxed sum, or void types. Return what the binder is if it is one of these.</span><span>
</span><span id="line-338"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkPostUnariseId"><span class="hs-identifier hs-type">checkPostUnariseId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-339"></span><span id="checkPostUnariseId"><span class="annot"><span class="annottext">checkPostUnariseId :: Id -&gt; Maybe String
</span><a href="GHC.Stg.Lint.html#checkPostUnariseId"><span class="hs-identifier hs-var hs-var">checkPostUnariseId</span></a></span></span><span> </span><span id="local-6989586621680954296"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954296"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-340"></span><span>    </span><span class="hs-keyword">let</span><span>
</span><span id="line-341"></span><span>      </span><span id="local-6989586621680954295"><span class="annot"><span class="annottext">id_ty :: Kind
</span><a href="#local-6989586621680954295"><span class="hs-identifier hs-var hs-var">id_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954296"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-342"></span><span>      </span><span class="annot"><a href="#local-6989586621680954294"><span class="hs-identifier hs-type">is_sum</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680954293"><span class="hs-identifier hs-type">is_tuple</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680954292"><span class="hs-identifier hs-type">is_void</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-343"></span><span>      </span><span id="local-6989586621680954294"><span class="annot"><span class="annottext">is_sum :: Maybe String
</span><a href="#local-6989586621680954294"><span class="hs-identifier hs-var hs-var">is_sum</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Maybe ()
forall (f :: * -&gt; *). Alternative f =&gt; Bool -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnboxedSumType"><span class="hs-identifier hs-var">isUnboxedSumType</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680954295"><span class="hs-identifier hs-var">id_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe () -&gt; Maybe String -&gt; Maybe String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unboxed sum&quot;</span></span><span>
</span><span id="line-344"></span><span>      </span><span id="local-6989586621680954293"><span class="annot"><span class="annottext">is_tuple :: Maybe String
</span><a href="#local-6989586621680954293"><span class="hs-identifier hs-var hs-var">is_tuple</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Maybe ()
forall (f :: * -&gt; *). Alternative f =&gt; Bool -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnboxedTupleType"><span class="hs-identifier hs-var">isUnboxedTupleType</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680954295"><span class="hs-identifier hs-var">id_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe () -&gt; Maybe String -&gt; Maybe String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unboxed tuple&quot;</span></span><span>
</span><span id="line-345"></span><span>      </span><span id="local-6989586621680954292"><span class="annot"><span class="annottext">is_void :: Maybe String
</span><a href="#local-6989586621680954292"><span class="hs-identifier hs-var hs-var">is_void</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Maybe ()
forall (f :: * -&gt; *). Alternative f =&gt; Bool -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Types.RepType.html#isVoidTy"><span class="hs-identifier hs-var">isVoidTy</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680954295"><span class="hs-identifier hs-var">id_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe () -&gt; Maybe String -&gt; Maybe String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;void&quot;</span></span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-keyword">in</span><span>
</span><span id="line-347"></span><span>      </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680954294"><span class="hs-identifier hs-var">is_sum</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Maybe String -&gt; Maybe String
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680954293"><span class="hs-identifier hs-var">is_tuple</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Maybe String -&gt; Maybe String
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680954292"><span class="hs-identifier hs-var">is_void</span></a></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-type">addErrL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-350"></span><span id="addErrL"><span class="annot"><span class="annottext">addErrL :: MsgDoc -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#addErrL"><span class="hs-identifier hs-var hs-var">addErrL</span></a></span></span><span> </span><span id="local-6989586621680954288"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954288"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; ((), Bag MsgDoc))
-&gt; LintM ()
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; ((), Bag MsgDoc))
 -&gt; LintM ())
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; ((), Bag MsgDoc))
-&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954287"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954287"><span class="hs-identifier hs-var">_mod</span></a></span></span><span> </span><span id="local-6989586621680954286"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954286"><span class="hs-identifier hs-var">_lf</span></a></span></span><span> </span><span id="local-6989586621680954285"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954285"><span class="hs-identifier hs-var">_opts</span></a></span></span><span> </span><span id="local-6989586621680954284"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954284"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954283"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954283"><span class="hs-identifier hs-var">_scope</span></a></span></span><span> </span><span id="local-6989586621680954282"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954282"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc -&gt; MsgDoc -&gt; [LintLocInfo] -&gt; Bag MsgDoc
</span><a href="GHC.Stg.Lint.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954282"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954288"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954284"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.Stg.Lint.html#addErr"><span class="hs-identifier hs-type">addErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Lint.html#LintLocInfo"><span class="hs-identifier hs-type">LintLocInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span>
</span><span id="line-353"></span><span id="addErr"><span class="annot"><span class="annottext">addErr :: Bag MsgDoc -&gt; MsgDoc -&gt; [LintLocInfo] -&gt; Bag MsgDoc
</span><a href="GHC.Stg.Lint.html#addErr"><span class="hs-identifier hs-var hs-var">addErr</span></a></span></span><span> </span><span id="local-6989586621680954280"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954280"><span class="hs-identifier hs-var">errs_so_far</span></a></span></span><span> </span><span id="local-6989586621680954279"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954279"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span id="local-6989586621680954278"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954278"><span class="hs-identifier hs-var">locs</span></a></span></span><span>
</span><span id="line-354"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954280"><span class="hs-identifier hs-var">errs_so_far</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc -&gt; MsgDoc -&gt; Bag MsgDoc
forall a. Bag a -&gt; a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#snocBag"><span class="hs-operator hs-var">`snocBag`</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo] -&gt; MsgDoc
</span><a href="#local-6989586621680954277"><span class="hs-identifier hs-var">mk_msg</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954278"><span class="hs-identifier hs-var">locs</span></a></span><span>
</span><span id="line-355"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-356"></span><span>    </span><span id="local-6989586621680954277"><span class="annot"><span class="annottext">mk_msg :: [LintLocInfo] -&gt; MsgDoc
</span><a href="#local-6989586621680954277"><span class="hs-identifier hs-var hs-var">mk_msg</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954276"><span class="annot"><span class="annottext">LintLocInfo
</span><a href="#local-6989586621680954276"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[LintLocInfo]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680954275"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680954275"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680954274"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954274"><span class="hs-identifier hs-var">hdr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LintLocInfo -&gt; (SrcSpan, MsgDoc)
</span><a href="GHC.Stg.Lint.html#dumpLoc"><span class="hs-identifier hs-var">dumpLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LintLocInfo
</span><a href="#local-6989586621680954276"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-357"></span><span>                     </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">Severity -&gt; SrcSpan -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Error.html#mkLocMessage"><span class="hs-identifier hs-var">mkLocMessage</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevWarning"><span class="hs-identifier hs-var">SevWarning</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680954275"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954274"><span class="hs-identifier hs-var">hdr</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954279"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>    </span><span class="annot"><a href="#local-6989586621680954277"><span class="hs-identifier hs-var">mk_msg</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621680954279"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span id="local-6989586621680954884"><span class="annot"><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-type">addLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintLocInfo"><span class="hs-identifier hs-type">LintLocInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954884"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954884"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-361"></span><span id="addLoc"><span class="annot"><span class="annottext">addLoc :: forall a. LintLocInfo -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addLoc"><span class="hs-identifier hs-var hs-var">addLoc</span></a></span></span><span> </span><span id="local-6989586621680954272"><span class="annot"><span class="annottext">LintLocInfo
</span><a href="#local-6989586621680954272"><span class="hs-identifier hs-var">extra_loc</span></a></span></span><span> </span><span id="local-6989586621680954271"><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954271"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (a, Bag MsgDoc))
 -&gt; LintM a)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954270"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954270"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680954269"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954269"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621680954268"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954268"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954267"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954267"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954266"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954266"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680954265"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954265"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-362"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954271"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954270"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954269"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954268"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintLocInfo
</span><a href="#local-6989586621680954272"><span class="hs-identifier hs-var">extra_loc</span></a></span><span class="annot"><span class="annottext">LintLocInfo -&gt; [LintLocInfo] -&gt; [LintLocInfo]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954267"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954266"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954265"><span class="hs-identifier hs-var">errs</span></a></span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span id="local-6989586621680954901"><span class="annot"><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-type">addInScopeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954901"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954901"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-365"></span><span id="addInScopeVars"><span class="annot"><span class="annottext">addInScopeVars :: forall a. [Id] -&gt; LintM a -&gt; LintM a
</span><a href="GHC.Stg.Lint.html#addInScopeVars"><span class="hs-identifier hs-var hs-var">addInScopeVars</span></a></span></span><span> </span><span id="local-6989586621680954264"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954264"><span class="hs-identifier hs-var">ids</span></a></span></span><span> </span><span id="local-6989586621680954263"><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954263"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (a, Bag MsgDoc))
 -&gt; LintM a)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (a, Bag MsgDoc))
-&gt; LintM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954262"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954262"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680954261"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954261"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621680954260"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954260"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954259"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954259"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954258"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954258"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680954257"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954257"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-366"></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-367"></span><span>        </span><span id="local-6989586621680954256"><span class="annot"><span class="annottext">new_set :: IdSet
</span><a href="#local-6989586621680954256"><span class="hs-identifier hs-var hs-var">new_set</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; IdSet
</span><a href="GHC.Types.Var.Set.html#mkVarSet"><span class="hs-identifier hs-var">mkVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680954264"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-368"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
forall a.
LintM a
-&gt; Module
-&gt; LintFlags
-&gt; StgPprOpts
-&gt; [LintLocInfo]
-&gt; IdSet
-&gt; Bag MsgDoc
-&gt; (a, Bag MsgDoc)
</span><a href="GHC.Stg.Lint.html#unLintM"><span class="hs-identifier hs-var hs-var">unLintM</span></a></span><span> </span><span class="annot"><span class="annottext">LintM a
</span><a href="#local-6989586621680954263"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954262"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954261"><span class="hs-identifier hs-var">lf</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954260"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954259"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954258"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet -&gt; IdSet -&gt; IdSet
</span><a href="GHC.Types.Var.Set.html#unionVarSet"><span class="hs-operator hs-var">`unionVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954256"><span class="hs-identifier hs-var">new_set</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954257"><span class="hs-identifier hs-var">errs</span></a></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="annot"><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-type">getLintFlags</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintFlags"><span class="hs-identifier hs-type">LintFlags</span></a></span><span>
</span><span id="line-371"></span><span id="getLintFlags"><span class="annot"><span class="annottext">getLintFlags :: LintM LintFlags
</span><a href="GHC.Stg.Lint.html#getLintFlags"><span class="hs-identifier hs-var hs-var">getLintFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (LintFlags, Bag MsgDoc))
-&gt; LintM LintFlags
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (LintFlags, Bag MsgDoc))
 -&gt; LintM LintFlags)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (LintFlags, Bag MsgDoc))
-&gt; LintM LintFlags
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954254"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954254"><span class="hs-identifier hs-var">_mod</span></a></span></span><span> </span><span id="local-6989586621680954253"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954253"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span id="local-6989586621680954252"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954252"><span class="hs-identifier hs-var">_opts</span></a></span></span><span> </span><span id="local-6989586621680954251"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954251"><span class="hs-identifier hs-var">_loc</span></a></span></span><span> </span><span id="local-6989586621680954250"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954250"><span class="hs-identifier hs-var">_scope</span></a></span></span><span> </span><span id="local-6989586621680954249"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954249"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954253"><span class="hs-identifier hs-var">lf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954249"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span class="annot"><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-type">getStgPprOpts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgPprOpts"><span class="hs-identifier hs-type">StgPprOpts</span></a></span><span>
</span><span id="line-374"></span><span id="getStgPprOpts"><span class="annot"><span class="annottext">getStgPprOpts :: LintM StgPprOpts
</span><a href="GHC.Stg.Lint.html#getStgPprOpts"><span class="hs-identifier hs-var hs-var">getStgPprOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (StgPprOpts, Bag MsgDoc))
-&gt; LintM StgPprOpts
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; (StgPprOpts, Bag MsgDoc))
 -&gt; LintM StgPprOpts)
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; (StgPprOpts, Bag MsgDoc))
-&gt; LintM StgPprOpts
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954248"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954248"><span class="hs-identifier hs-var">_mod</span></a></span></span><span> </span><span id="local-6989586621680954247"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954247"><span class="hs-identifier hs-var">_lf</span></a></span></span><span> </span><span id="local-6989586621680954246"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954246"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954245"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954245"><span class="hs-identifier hs-var">_loc</span></a></span></span><span> </span><span id="local-6989586621680954244"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954244"><span class="hs-identifier hs-var">_scope</span></a></span></span><span> </span><span id="local-6989586621680954243"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954243"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954246"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954243"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span class="annot"><a href="GHC.Stg.Lint.html#checkInScope"><span class="hs-identifier hs-type">checkInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-type">LintM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span id="checkInScope"><span class="annot"><span class="annottext">checkInScope :: Id -&gt; LintM ()
</span><a href="GHC.Stg.Lint.html#checkInScope"><span class="hs-identifier hs-var hs-var">checkInScope</span></a></span></span><span> </span><span id="local-6989586621680954242"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954242"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; ((), Bag MsgDoc))
-&gt; LintM ()
forall a.
(Module
 -&gt; LintFlags
 -&gt; StgPprOpts
 -&gt; [LintLocInfo]
 -&gt; IdSet
 -&gt; Bag MsgDoc
 -&gt; (a, Bag MsgDoc))
-&gt; LintM a
</span><a href="GHC.Stg.Lint.html#LintM"><span class="hs-identifier hs-var">LintM</span></a></span><span> </span><span class="annot"><span class="annottext">((Module
  -&gt; LintFlags
  -&gt; StgPprOpts
  -&gt; [LintLocInfo]
  -&gt; IdSet
  -&gt; Bag MsgDoc
  -&gt; ((), Bag MsgDoc))
 -&gt; LintM ())
-&gt; (Module
    -&gt; LintFlags
    -&gt; StgPprOpts
    -&gt; [LintLocInfo]
    -&gt; IdSet
    -&gt; Bag MsgDoc
    -&gt; ((), Bag MsgDoc))
-&gt; LintM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680954241"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954241"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680954240"><span class="annot"><span class="annottext">LintFlags
</span><a href="#local-6989586621680954240"><span class="hs-identifier hs-var">_lf</span></a></span></span><span> </span><span id="local-6989586621680954239"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954239"><span class="hs-identifier hs-var">_opts</span></a></span></span><span> </span><span id="local-6989586621680954238"><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954238"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680954237"><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954237"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span id="local-6989586621680954236"><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954236"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-378"></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680954241"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954242"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954242"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdSet -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#elemVarSet"><span class="hs-operator hs-var">`elemVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">IdSet
</span><a href="#local-6989586621680954237"><span class="hs-identifier hs-var">scope</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-379"></span><span>        </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc -&gt; MsgDoc -&gt; [LintLocInfo] -&gt; Bag MsgDoc
</span><a href="GHC.Stg.Lint.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954236"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954242"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954242"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-380"></span><span>                                </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is out of scope&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LintLocInfo]
</span><a href="#local-6989586621680954238"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>    </span><span class="hs-keyword">else</span><span>
</span><span id="line-382"></span><span>        </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag MsgDoc
</span><a href="#local-6989586621680954236"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span id="local-6989586621680954881"><span class="annot"><a href="GHC.Stg.Lint.html#mkUnliftedTyMsg"><span class="hs-identifier hs-type">mkUnliftedTyMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#OutputablePass"><span class="hs-identifier hs-type">OutputablePass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954881"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgPprOpts"><span class="hs-identifier hs-type">StgPprOpts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#GenStgRhs"><span class="hs-identifier hs-type">GenStgRhs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680954881"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-385"></span><span id="mkUnliftedTyMsg"><span class="annot"><span class="annottext">mkUnliftedTyMsg :: forall (a :: StgPass).
OutputablePass a =&gt;
StgPprOpts -&gt; Id -&gt; GenStgRhs a -&gt; MsgDoc
</span><a href="GHC.Stg.Lint.html#mkUnliftedTyMsg"><span class="hs-identifier hs-var hs-var">mkUnliftedTyMsg</span></a></span></span><span> </span><span id="local-6989586621680954226"><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954226"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span id="local-6989586621680954225"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954225"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680954224"><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954224"><span class="hs-identifier hs-var">rhs</span></a></span></span><span>
</span><span id="line-386"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Let(rec) binder&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954225"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-387"></span><span>     </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;has unlifted type&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680954225"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-388"></span><span>    </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-389"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RHS:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts -&gt; GenStgRhs a -&gt; MsgDoc
forall (pass :: StgPass).
OutputablePass pass =&gt;
StgPprOpts -&gt; GenStgRhs pass -&gt; MsgDoc
</span><a href="GHC.Stg.Syntax.html#pprStgRhs"><span class="hs-identifier hs-var">pprStgRhs</span></a></span><span> </span><span class="annot"><span class="annottext">StgPprOpts
</span><a href="#local-6989586621680954226"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GenStgRhs a
</span><a href="#local-6989586621680954224"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span></pre></body></html>